package com.demo.conf;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * 实现静态资源的映射
 * 保证能够访问到诸如.js,.css等静态资源
 * @ClassName StaticResourceMapConfiguration
 */
@Configuration
public class StaticResourceMapConfiguration extends WebMvcConfigurerAdapter{
	@Override
	public void addResourceHandlers(ResourceHandlerRegistry registry) {
		registry.addResourceHandler("/**").addResourceLocations("classpath:/html_demo/");
		super.addResourceHandlers(registry);
	}
}
